<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>模板字符串</h1>
    <script>
        var user = {
            name: '杰克', city: '华盛顿'
        }
        // 模板字符串: 字符正常书写, 变量写在${变量}内部, 可以换行书写
        var str = `
            我叫${user.name}, 
            我来自${user.city}
        `
        console.log(str);

    </script>
</body>

</html>